diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
old mode 100755
new mode 100644
index c630ebe..2cbcd9d
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -1,13 +1,13 @@
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /**
  * CodeIgniter
  *
  * An open source application development framework for PHP 5.1.6 or newer
  *
  * NOTICE OF LICENSE
- * 
+ *
  * Licensed under the Open Software License version 3.0
- * 
+ *
  * This source file is subject to the Open Software License (OSL 3.0) that is
  * bundled with this package in the files license.txt / license.rst.  It is
  * also available through the world wide web at this URL:
@@ -62,7 +62,7 @@
 
 /**
  * Base URL
- * 
+ *
  * Create a local URL based on your basepath.
  * Segments can be passed in as a string or an array, same as site_url
  * or a URL to a file can be passed in, e.g. to an image file.
@@ -198,7 +198,6 @@
 	function anchor_popup($uri = '', $title = '', $attributes = FALSE)
 	{
 		$title = (string) $title;
-
 		$site_url = ( ! preg_match('!^\w+://! i', $uri)) ? site_url($uri) : $uri;
 
 		if ($title == '')
@@ -248,14 +247,12 @@
 	{
 		$title = (string) $title;
 
-		if ($title == "")
+		if ($title == '')
 		{
 			$title = $email;
 		}
 
-		$attributes = _parse_attributes($attributes);
-
-		return '<a href="mailto:'.$email.'"'.$attributes.'>'.$title.'</a>';
+		return '<a href="mailto:'.$email.'"'._parse_attributes($attributes).'>'.$title.'</a>';
 	}
 }
 
@@ -278,19 +275,16 @@
 	{
 		$title = (string) $title;
 
-		if ($title == "")
+		if ($title == '')
 		{
 			$title = $email;
 		}
 
-		for ($i = 0; $i < 16; $i++)
-		{
-			$x[] = substr('<a href="mailto:', $i, 1);
-		}
+		$x = str_split('<a href="mailto:', 1);
 
-		for ($i = 0; $i < strlen($email); $i++)
+		for ($i = 0, $l = strlen($email); $i < $l; $i++)
 		{
-			$x[] = "|".ord(substr($email, $i, 1));
+			$x[] = '|'.ord($email[$i]);
 		}
 
 		$x[] = '"';
@@ -302,18 +296,18 @@
 				foreach ($attributes as $key => $val)
 				{
 					$x[] =  ' '.$key.'="';
-					for ($i = 0; $i < strlen($val); $i++)
+					for ($i = 0, $l = strlen($val); $i < $l; $i++)
 					{
-						$x[] = "|".ord(substr($val, $i, 1));
+						$x[] = '|'.ord($val[$i]);
 					}
 					$x[] = '"';
 				}
 			}
 			else
 			{
-				for ($i = 0; $i < strlen($attributes); $i++)
+				for ($i = 0, $l = strlen($attributes); $i < $l; $i++)
 				{
-					$x[] = substr($attributes, $i, 1);
+					$x[] = $attributes[$i];
 				}
 			}
 		}
@@ -321,26 +315,28 @@
 		$x[] = '>';
 
 		$temp = array();
-		for ($i = 0; $i < strlen($title); $i++)
+		for ($i = 0, $l = strlen($title); $i < $l; $i++)
 		{
 			$ordinal = ord($title[$i]);
 
 			if ($ordinal < 128)
 			{
-				$x[] = "|".$ordinal;
+				$x[] = '|'.$ordinal;
 			}
 			else
 			{
-				if (count($temp) == 0)
+				if (count($temp) === 0)
 				{
 					$count = ($ordinal < 224) ? 2 : 3;
 				}
 
 				$temp[] = $ordinal;
-				if (count($temp) == $count)
+				if (count($temp) === $count)
 				{
-					$number = ($count == 3) ? (($temp['0'] % 16) * 4096) + (($temp['1'] % 64) * 64) + ($temp['2'] % 64) : (($temp['0'] % 32) * 64) + ($temp['1'] % 64);
-					$x[] = "|".$number;
+					$number = ($count === 3)
+							? (($temp[0] % 16) * 4096) + (($temp[1] % 64) * 64) + ($temp[2] % 64)
+							: (($temp[0] % 32) * 64) + ($temp[1] % 64);
+					$x[] = '|'.$number;
 					$count = 1;
 					$temp = array();
 				}
@@ -356,8 +352,7 @@
 	//<![CDATA[
 	var l=new Array();
 	<?php
-	$i = 0;
-	foreach ($x as $val){ ?>l[<?php echo $i++; ?>]='<?php echo $val; ?>';<?php } ?>
+	for ($i = 0, $c = count($x); $i < $c; $i++) { ?>l[<?php echo $i; ?>]='<?php echo $x[$i]; ?>';<?php } ?>
 
 	for (var i = l.length-1; i >= 0; i=i-1){
 	if (l[i].substring(0, 1) == '|') document.write("&#"+unescape(l[i].substring(1))+";");
@@ -391,49 +386,46 @@
 {
 	function auto_link($str, $type = 'both', $popup = FALSE)
 	{
-		if ($type != 'email')
+		if ($type !== 'email' && preg_match_all('#(^|\s|\(|\b)((http(s?)://)|(www\.))(\w+[^\s\)\<]+)#i', $str, $matches))
 		{
-			if (preg_match_all("#(^|\s|\(|\b)((http(s?)://)|(www\.))(\w+[^\s\)\<]+)#i", $str, $matches))
-			{
-				$pop = ($popup == TRUE) ? " target=\"_blank\" " : "";
+			$pop = ($popup) ? ' target="_blank" ' : '';
 
-				for ($i = 0; $i < count($matches['0']); $i++)
+			for ($i = 0, $c = count($matches[0]); $i < $c; $i++)
+			{
+				if (preg_match('|\.$|', $matches[6][$i]))
+				{
+					$period = '.';
+					$matches[6][$i] = substr($matches[6][$i], 0, -1);
+				}
+				else
 				{
 					$period = '';
-					if (preg_match("|\.$|", $matches['6'][$i]))
-					{
-						$period = '.';
-						$matches['6'][$i] = substr($matches['6'][$i], 0, -1);
-					}
-
-					$str = str_replace($matches['0'][$i],
-										$matches['1'][$i].'<a href="http'.
-										$matches['4'][$i].'://'.
-										$matches['5'][$i].
-										$matches['6'][$i].'"'.$pop.'>http'.
-										$matches['4'][$i].'://'.
-										$matches['5'][$i].
-										$matches['6'][$i].'</a>'.
-										$period, $str);
 				}
+
+				$str = str_replace($matches[0][$i],
+							$matches[1][$i].'<a href="http'.$matches[4][$i].'://'
+								.$matches[5][$i].$matches[6][$i].'"'.$pop.'>http'
+								.$matches[4][$i].'://'.$matches[5][$i]
+								.$matches[6][$i].'</a>'.$period,
+							$str);
 			}
 		}
 
-		if ($type != 'url')
+		if ($type !== 'url' && preg_match_all('/([a-zA-Z0-9_\.\-\+]+)@([a-zA-Z0-9\-]+)\.([a-zA-Z0-9\-\.]*)/i', $str, $matches))
 		{
-			if (preg_match_all("/([a-zA-Z0-9_\.\-\+]+)@([a-zA-Z0-9\-]+)\.([a-zA-Z0-9\-\.]*)/i", $str, $matches))
+			for ($i = 0, $c = count($matches); $i < $c; $i++)
 			{
-				for ($i = 0; $i < count($matches['0']); $i++)
+				if (preg_match('|\.$|', $matches[3][$i]))
+				{
+					$period = '.';
+					$matches[3][$i] = substr($matches[3][$i], 0, -1);
+				}
+				else
 				{
 					$period = '';
-					if (preg_match("|\.$|", $matches['3'][$i]))
-					{
-						$period = '.';
-						$matches['3'][$i] = substr($matches['3'][$i], 0, -1);
-					}
-
-					$str = str_replace($matches['0'][$i], safe_mailto($matches['1'][$i].'@'.$matches['2'][$i].'.'.$matches['3'][$i]).$period, $str);
 				}
+
+				$str = str_replace($matches[0][$i], safe_mailto($matches[1][$i].'@'.$matches[2][$i].'.'.$matches[3][$i]).$period, $str);
 			}
 		}
 
@@ -456,7 +448,7 @@
 {
 	function prep_url($str = '')
 	{
-		if ($str == 'http://' OR $str == '')
+		if ($str === 'http://' OR $str == '')
 		{
 			return '';
 		}
@@ -465,7 +457,7 @@
 
 		if ( ! $url OR ! isset($url['scheme']))
 		{
-			$str = 'http://'.$str;
+			return 'http://'.$str;
 		}
 
 		return $str;
@@ -490,7 +482,7 @@
 {
 	function url_title($str, $separator = 'dash', $lowercase = FALSE)
 	{
-		if ($separator == 'dash')
+		if ($separator === 'dash')
 		{
 			$search		= '_';
 			$replace	= '-';
@@ -513,10 +505,9 @@
 					);
 
 		$str = strip_tags($str);
-
 		foreach ($trans as $key => $val)
 		{
-			$str = preg_replace("#".$key."#i", $val, $str);
+			$str = preg_replace('#'.$key.'#i', $val, $str);
 		}
 
 		if ($lowercase === TRUE)
@@ -552,16 +543,18 @@
 		}
 
 		// IIS environment likely? Use 'refresh' for better compatibility
-		if (DIRECTORY_SEPARATOR != '/' && $method == 'auto')
+		if (DIRECTORY_SEPARATOR !== '/' && $method === 'auto')
 		{
 			$method = 'refresh';
 		}
 
 		switch($method)
 		{
-			case 'refresh'	: header("Refresh:0;url=".$uri);
+			case 'refresh':
+				header('Refresh:0;url='.$uri);
 				break;
-			default			: header("Location: ".$uri, TRUE, $http_response_code);
+			default:
+				header('Location: '.$uri, TRUE, $http_response_code);
 				break;
 		}
 		exit;
@@ -604,13 +597,12 @@
 
 		if ($javascript == TRUE AND $att != '')
 		{
-			$att = substr($att, 0, -1);
+			return substr($att, 0, -1);
 		}
 
 		return $att;
 	}
 }
 
-
 /* End of file url_helper.php */
-/* Location: ./system/helpers/url_helper.php */
\ No newline at end of file
+/* Location: ./system/helpers/url_helper.php */
